<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="p"%>
<%
	String path = request.getContextPath();
	String root = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path;
	request.setAttribute("root", root);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=8" />

	<title>MochaUI - A Web Applications User Interface Library</title>
	<meta name="description" content="A web applications user interface library built on the Mootools javascript framework" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />

	<link rel="stylesheet" type="text/css" href="${root}/static/themes/default/css/Content.css" />
	<link rel="stylesheet" type="text/css" href="${root}/static/themes/default/css/Core.css" />
	<link rel="stylesheet" type="text/css" href="${root}/static/themes/default/css/Layout.css" />
	<link rel="stylesheet" type="text/css" href="${root}/static/themes/default/css/Dock.css" />
	<link rel="stylesheet" type="text/css" href="${root}/static/themes/default/css/Tabs.css" />
	<link rel="stylesheet" type="text/css" href="${root}/static/themes/default/css/Window.css" />

    <script type="text/javascript" src="${root}/static/scripts/mootools-1.2.4-core-yc.js"></script>
    <script type="text/javascript" src="${root}/static/scripts/mootools-1.2.4-more-yc.js"></script>
    <script type="text/javascript" src="${root}/static/scripts/mocha.js"></script>    
	<script type="text/javascript" src="${root}/static/scripts/demo-virtual-desktop-init.js"></script>
	<script type="text/javascript" src="${root}/static/plugins/tree/scripts/tree.js"></script>
	<script type="text/javascript" src="${root}/static/wdate/WdatePicker.js"></script>
</head>
<body>

<div id="desktop">
	<s:include value="../common/header.jsp"/>
	<div id="pageWrapper" style="height: 600px;">
	</div>
	<s:include value="../common/footer.jsp"/>
</div><!-- desktop end -->
<script>
initializeColumns = function() {

    new MUI.Column({
        id: 'sideColumn1',
        placement: 'left',
        width: 200,
        resizeLimit: [100, 250]
    });

    new MUI.Column({
        id: 'mainColumn',
        placement: 'main',
        width: 600,
    });
    // Add panels to first side column
    new MUI.Panel({
        id: 'files-panel',
        title: 'Examples',
        contentURL: '${root}/static/pages/file-view.html',
        column: 'sideColumn1',
        require: {
            css: ['${root}/static/plugins/tree/css/style.css'],
            js: ['${root}/static/plugins/tree/scripts/tree.js'],
            onload: function() {
                if (buildTree) {
                	buildTree('tree1', '${root}/static');
                }
            }
        },
        onContentLoaded: function(){		
			$('notesLink').addEvent('click', function(e){
				MUI.updateContent({
					element: $('panel2'),					
					url: 'agreement/add.action',
					loadMethod: 'iframe',
					title: '添加合同',
					padding: { top: 8, right: 8, bottom: 8, left: 8 }
				});
			});
			
			$('add_company').addEvent('click', function(e){
				MUI.updateContent({
					element: $('panel2'),					
					url: 'company/add.action',
					title: '添加 单位 / 合同',
					loadMethod: 'iframe',
					padding: { top: 8, right: 8, bottom: 8, left: 8 }
				});
			});
			$('splitPanelLink').addEvent('click', function(e){
				MUI.updateContent({
					element: $('panel2'),					
					url: 'company/index.action',
					loadMethod: 'iframe',
					title: 'template',
					padding: { top: 8, right: 8, bottom: 8, left: 8 }
				});
			});
			
			
			$('employee_index').addEvent('click', function(e){
				MUI.updateContent({
					element: $('panel2'),					
					url: 'employee/index.action',
					title: '所有员工',
					loadMethod: 'iframe',
					padding: { top: 8, right: 8, bottom: 8, left: 8 }
				});
			});
			$('ins_index').addEvent('click', function(e){
				MUI.updateContent({
					element: $('panel2'),	
					loadMethod: 'iframe',				
					url: 'insurance/index.action',
					title: 'sadfsdf',
					padding: { top: 8, right: 8, bottom: 8, left: 8 }
				});
			});
			
			$('add_employee').addEvent('click', function(e){
				MUI.updateContent({
					element: $('panel2'),					
					url: 'employee/add.action',
					loadMethod: 'iframe',
					title: '添加员工',
					padding: { top: 8, right: 8, bottom: 8, left: 8 }
				});
			});
			$('NO30').addEvent('click', function(e){
				MUI.updateContent({
					element: $('panel2'),					
					url: 'prefee/do.action',
					loadMethod: 'iframe',
					title: 'template',
					padding: { top: 8, right: 8, bottom: 8, left: 8 }
				});
			});
			$('NO31').addEvent('click', function(e){
				MUI.updateContent({
					element: $('panel2'),					
					url: 'prefee/index.action',
					loadMethod: 'iframe',
					title: 'template',
					padding: { top: 8, right: 8, bottom: 8, left: 8 }
				});
			});
			$('NO32').addEvent('click', function(e){
				MUI.updateContent({
					element: $('panel2'),					
					url: 'predetail/index.action',
					loadMethod: 'iframe',
					title: 'template',
					padding: { top: 8, right: 8, bottom: 8, left: 8 }
				});
			});
			$('NO33').addEvent('click', function(e){
				MUI.updateContent({
					element: $('panel2'),					
					url: 'predetail/none.action',
					loadMethod: 'iframe',
					title: 'template',
					padding: { top: 8, right: 8, bottom: 8, left: 8 }
				});
			});
			$('sr_index').addEvent('click', function(e){
				MUI.updateContent({
					element: $('panel2'),					
					url: 'job/index.action',
					loadMethod: 'iframe',
					scrollbars : true,
					title: 'template',
					padding: { top: 8, right: 8, bottom: 8, left: 8 }
				});
			});
			
			
			$('agreement_index').addEvent('click', function(e){
				MUI.updateContent({
					element: $('panel2'),					
					url: 'agreement/index.action',
					loadMethod: 'iframe',
					title: 'template',
					scrollbars : true,
					padding: { top: 8, right: 8, bottom: 8, left: 8 }
				});
			});
			$('NO40').addEvent('click', function(e){
				MUI.updateContent({
					element: $('panel2'),					
					url: 'presalary/import.action',
					loadMethod: 'iframe',
					scrollbars: true,
					title: 'template',
					padding: { top: 8, right: 8, bottom: 8, left: 8 }
				});
			});
			$('NO41').addEvent('click', function(e){
				MUI.updateContent({
					element: $('panel2'),					
					url: 'presalary/index.action',
					loadMethod: 'iframe',
					scrollbars: true,
					title: 'template',
					padding: { top: 8, right: 8, bottom: 8, left: 8 }
				});
			});
			$('NO42').addEvent('click', function(e){
				MUI.updateContent({
					element: $('panel2'),					
					url: 'presalary/none.action',
					loadMethod: 'iframe',
					scrollbars: true,
					title: 'template',
					padding: { top: 8, right: 8, bottom: 8, left: 8 }
				});
			});
			$('NO43').addEvent('click', function(e){
				MUI.updateContent({
					element: $('panel2'),					
					url: 'presdetail/index.action',
					loadMethod: 'iframe',
					title: 'template',
					scrollbars: true,
					padding: { top: 8, right: 8, bottom: 8, left: 8 }
				});
			});
			$('NO44').addEvent('click', function(e){
				MUI.updateContent({
					element: $('panel2'),					
					url: 'presdetail/none.action',
					loadMethod: 'iframe',
					scrollbars: true,
					title: 'template',
					padding: { top: 8, right: 8, bottom: 8, left: 8 }
				});
			});
			$('NO45').addEvent('click', function(e){
				MUI.updateContent({
					element: $('panel2'),					
					url: 'salary/index.action',
					loadMethod: 'iframe',
					scrollbars: true,
					title: 'template',
					padding: { top: 8, right: 8, bottom: 8, left: 8 }
				});
			});
			$('NO46').addEvent('click', function(e){
				MUI.updateContent({
					element: $('panel2'),					
					url: 'salary/none.action',
					loadMethod: 'iframe',
					title: 'template',
					scrollbars: true,
					padding: { top: 8, right: 8, bottom: 8, left: 8 }
				});
			});
			$('NO50').addEvent('click', function(e){
				MUI.updateContent({
					element: $('panel2'),					
					url: 'subtpl/add.action',
					loadMethod: 'iframe',
					title: 'template',
					scrollbars: true,
					padding: { top: 8, right: 8, bottom: 8, left: 8 }
				});
			});
			$('NO51').addEvent('click', function(e){
				MUI.updateContent({
					element: $('panel2'),					
					url: 'subtpl/index.action',
					loadMethod: 'iframe',
					title: 'template',
					scrollbars: true,
					padding: { top: 8, right: 8, bottom: 8, left: 8 }
				});
			});
			
		}
    });
    new MUI.Panel({
		id: 'panel2',
		title: '',
		content: '',
		loadMethod: 'iframe',
		column: 'mainColumn',
		height: 230,
		onContentLoaded: function(){
		}
	});
};
window.addEvent('load',
function() { //using load instead of domready for IE8
    MUI.myChain = new Chain();
    MUI.myChain.chain(function() {
        initializeColumns();
    }).callChain();

});
</script>
</body>
</html>
